/*
 * Created on 2004-11-17
 *
 * Copyright: Bluejay Networks Inc. & Inquiry Management Systems Ltd.  2004
 *
 * This software is the proprietary information of Bluejay Networks Inc. & 
 * Inquiry Management Systems Ltd.  
 * Use is subject to license terms.
 */
package com.ims.iaa.html;

import java.net.URL;

import com.ims.iaa.RobotsTXTAnalyzer;
import com.ims.iaa.SpiderDataStream;
import com.ims.iaa.AD.AdDataLink;
/**
 * @author ShengMeng Bai
 *
 * This is a Impression Analyzer interface.
 * it simulate AdDataLink queue
 *  
 * @see ImpAnalyzerCtrl, ImpAnalyzerImpl
 */
public interface ImpAnalyzer{
	/**
	 * Add a AdDataLink object to the queue for parse it.
	 * @param dataLink
	 */
	public void addAdDataLink(AdDataLink dataLink);
	/**
	 * Get a AdDataLink object to parse from queue.
	 * @param dataLink
	 */
	public AdDataLink getAdDataLink();
	/**
	 * If there isn't data need add to the queue, 
	 * call this method to set the over signed. 
	 */
	public void analyzeOver();
	
	/**
	 * Set the page UserAgent. 
	 */
	public void setUserAgent(String sAgent);
	public String getUserAgent();
	
	/**
	 * Set current implemention depth.
	 * @param iDepth
	 */
	public void setImpDepth(int iDepth);
	/**
	 * get current implemention depth.
	 */
	public int getImpDepth();

	/**
	 * Based on robots.txt of the site, 
	 * judge current URL can't access or not 
	 * this method dependent on setRobotsTxtAnaluzer(),
	 * if the parameter is null of setRobotsTxtAnaluzer(),
	 * should always return false
	 * 
	 * @param url
	 * @return false, if it is Accessible, else return true.
	 */
	public boolean isDisallow(URL url);
	public void setRobotsTxtAnaluzer(RobotsTXTAnalyzer ana);
	
	public SpiderDataStream getSpiderDataStream();
	
	//++changsheng 2006-7-21
	public ImpAnalyzerCtrl getAnalyzerCtrl();
	public void setAnalyzerCtrl(ImpAnalyzerCtrl analyzerCtrl);
	//--
}
